<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>具名slot</title>
    <script src="vue.js"></script>
</head>

<body>
    
    <template id="t1">
        <div>
            <slot name="CPU">Intel core i7 8th Gen</slot><br>
            <slot name="Memory">16GB</slot><br>
            <slot name="GPU">ADM 1080Ti</slot>
        </div>
    </template>

    <div id="app">
        <myalert>
            <div slot="GPU">ATX 3030</div>
        </myalert>
    </div>
</body>

</html>
<script>
    var vm = new Vue({
        el: "#app",
        components: {
            "myalert": {
                template: "#t1"
            }
        }
    })
</script>